import request from '@/utils/request'

// POST /agencyService/addBusinessAgency
// 保存机构--商业
export function addBusinessAgency(data) {
  return request({
    url: '/manager/agencyService/addBusinessAgency',
    method: 'post',
    data
  })
}

// POST /agencyService/addSchoolAgency
// 保存机构--学校
export function addSchoolAgency(data) {
  return request({
    url: '/manager/agencyService/addSchoolAgency',
    method: 'post',
    data
  })
}

// POST /agencyService/editAgency
// 编辑机构
export function editAgency(data) {
  return request({
    url: '/manager/agencyService/editAgency',
    method: 'post',
    data
  })
}

// POST /agencyService/editAgencyEffective
// 编辑机构是否有效
export function editAgencyEffective(data) {
  return request({
    url: '/manager/agencyService/editAgencyEffective',
    method: 'post',
    data
  })
}

// POST /agencyService/getAgencyDetail
// 获取机构详情
export function getAgencyDetail(data) {
  return request({
    url: '/manager/agencyService/getAgencyDetail',
    method: 'post',
    data
  })
}

// POST /agencyService/getAgencyList
// 获取机构列表
export function getAgencyList(data) {
  return request({
    url: '/manager/agencyService/getAgencyList',
    method: 'post',
    data
  })
}

// POST /agencyService/getAgencyTypeList
// 获取机构类型列表
export function getAgencyTypeList(data) {
  return request({
    url: '/manager/agencyService/getAgencyTypeList',
    method: 'post',
    data
  })
}

// GET /school/schoolsByAreaId/{areaId}
// 根据区域ID获取学校
export function getSchoolsByAreaId({ areaId }) {
  return request({
    url: `/manager/school/schoolsByAreaId/${areaId}`,
    method: 'get'
  })
}

// POST /agency/employess/create
// 创建机构账号
export function createAgency(data) {
  return request({
    url: '/manager/agency/employess/create',
    method: 'post',
    data
  })
}

// GET /agency/employess/get
// 机构用户信息查询
export function getAgency(data) {
  return request({
    url: '/manager/agency/employess/get',
    method: 'post',
    data
  })
}

// POST /agency/employess/initPassword
// 初始化机构账号密码
export function initPassword(data) {
  return request({
    url: '/manager/agency/employess/initPassword',
    method: 'post',
    data
  })
}

// POST /agency/employess/update
// 机构用户信息修改
export function updateAgency(data) {
  return request({
    url: '/manager/agency/employess/update',
    method: 'post',
    data
  })
}

// POST /agencyService/queryConfByType
// 查询大学特色标签API
export function queryConfByType(data) {
  return request({
    url: '/manager/agencyService/queryConfByType',
    method: 'post',
    data
  })
}
